<?php
namespace Api\Controller;
use Think\Controller;
class UpgradeController extends Controller{
	
	public function getVersion(){
		$type=$_POST["type"];
	    	if($type == "iphone"){
	    		$versionInfo = array(
	                                'version' => '1.0.0', 
	                                'upgrade_tips' => '有最新的版本哦，亲快下载吧~',
	                                'download_url' => '',
	                                'must_upgrade' => 1,
	                            ); 
	    	} elseif($type=="android") {
	        	$versionInfo = array(
	                                'version' => '1.0.1', 
	                                'upgrade_tips' => '主要更新内容：更换logo，更换关于我们的简介、图标，登录页的logo、分享的logo,修改安装工信息模块',
	                                'download_url' => 'http://jzhy.vba8.com/Uploads/JiaZhuangYi1.0.3.apk',
	                                'must_upgrade' => 1,
	                            );
	    	}
	    	$result['code'] = "success";
	    	$result['data'] = $versionInfo;                 
	       
	    	header("Content-Type: text/json");
	    	die(json_encode($result));
	   }
}